package com.bobo.demo1.controller;

import java.util.ArrayList;
import java.util.Random;
import java.util.TreeMap;

/**
 * Created by huangbo on 2022/3/18.
 */

public class Europe {
    public static void main(String[] args) {
        TreeMap tm=new TreeMap();//队伍集合
        tm.put(0,"拜仁慕尼黑"); tm.put(1,"曼城");tm.put(2,"利物浦");tm.put(3,"皇家马德里");
        tm.put(4,"切尔西");tm.put(5,"比利亚雷亚尔");tm.put(6,"本菲卡");tm.put(7,"马德里竞技");


        ArrayList tmid=new ArrayList();//抽签结果集合
        Random ran=new Random();//随机数取值放入抽签结果

        while(tmid.size()<8) {
            int x=ran.nextInt(8);
            if(tmid.contains(x)) {
                continue;
            }else {
                tmid.add(x);
            }
        }

        for(int s=0;s<tmid.size();s+=2) {//输出对应结果的球队
            System.out.println(tm.get(tmid.get(s))+"VS"+tm.get(tmid.get(s+1)));

        }
    }

}
